package ar.com.listeners;

import java.util.LinkedList;

import objetos.Gasto;
import objetos.Ingreso;
import objetos.MainObjc;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Toast;

public class ResetearHora implements OnClickListener{

	private MainObjc mainObj;
	
	
	public ResetearHora(MainObjc mainObjc) {

		this.mainObj = mainObjc;
		
	}

	
	public void onClick(View v) {

		
		LinkedList<Gasto> colGasto = mainObj.leerGastos();
		LinkedList<Ingreso> colIngreso = mainObj.leerIngresos();

		for (Object obj : colGasto) {

			Toast.makeText(mainObj.getMainContext(),
					((Gasto) obj).getImporte().toString(), Toast.LENGTH_SHORT)
					.show();
			Toast.makeText(mainObj.getMainContext(),
					((Gasto) obj).getDescripcion(), Toast.LENGTH_SHORT).show();

		}

		for (Object obj : colIngreso) {

			Toast.makeText(mainObj.getMainContext(),
					((Ingreso) obj).getImporte().toString(), Toast.LENGTH_SHORT)
					.show();
			Toast.makeText(mainObj.getMainContext(),
					((Ingreso) obj).getDescripcion(), Toast.LENGTH_SHORT)
					.show();
		}
		
		
		
		
		
	}

}
